﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UTSDAL.LINQSQL.Model;
using NUnit.Framework.SyntaxHelpers;

namespace UTSDAL.LINQSQL.DAO
{
    public class CohortDAO:GenericDAO<Cohort,Guid>
    {

        public List<Cohort> findCohortsBySemester(Semester semester)
        {
            var cohortVar = from c in base.Context.CohortModules
                            where c.Semester.Equals(semester)
                            select c.Cohort;

            return cohortVar.Distinct<Cohort>().ToList<Cohort>();

        }

    }
}
